﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using XStudio.XCRF.Data.Enums;
using XStudio.XCRF.Resources.Enums;

namespace XStudio.XCRF.Web.Models.Enums
{
    public class SourceTypeInfo
    {
        /// <summary>
        /// 病例来源类型名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 对应键值
        /// </summary>
        public byte Value { get; set; }

        public static string GetName(byte source)
        {
            string key = ((SourceTypes)source).ToString();
            return SourceTypeResource.ResourceManager.GetString(key);
        }
    }
}